package week9.Q4;

public class Car extends Vehicle implements IPower{
    private String carNumber;
    public Car(String brand,String color,String carNumber){
        super(brand,color);
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }
    public void run(){
        System.out.println("正在骑着"+getBrand()+"的"+getColor()+"轿车");
    }
    public void power(){
        System.out.println("动力是加油");
    }
}
